package com.homegoods.area.adapter;

import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import com.alibaba.fastjson.JSONObject;
import com.homegoods.area.R;
import com.kedll.library.adapter.MyArrayAdapter;


/**
 * @author slj
 * @date 2015/2/12
 */
public class HotCitiesAdapter extends MyArrayAdapter<JSONObject> {
    public HotCitiesAdapter(Context context) {
        super(context);
    }

    @Override
    public View getView(int position, View convertView, ViewGroup parent) {
        if (convertView == null) {
            convertView = mInflater.inflate(R.layout.area_hot_cities_child, null);
        }
        JSONObject jo = getItem(position);

        TextView tv = (TextView) convertView;
        tv.setText(jo.getString("cityName"));

        return convertView;
    }
}
